package pers.qianyu.module.core.domain.comment.dto;

import javax.validation.constraints.*;
import java.io.*;

public class CommentDTO implements Serializable{
    private static final long serialVersionUID = 3534234134052561039L;
    private Long createdBy;
    @NotNull(message = "评论对象 id 不能为空")
    private Long topicId;
    private Long parentId;
    @NotBlank(message = "评论内容不能为空")
    private String content;

    public Long getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public Long getTopicId() {
        return topicId;
    }

    public void setTopicId(Long topicId) {
        this.topicId = topicId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "CommentDTO{" +
                "createdBy=" + createdBy +
                ", topicId=" + topicId +
                ", parentId=" + parentId +
                ", content='" + content + '\'' +
                '}';
    }
}
